import pytest

version=21
def add(x, y):
    return x + y
@pytest.mark.skipif(version>20,reason="版本已更新")
class TestOrdering:

    @pytest.mark.run(order=1)
    def test_01(self):
        result=add(1,1)
        assert 2==result
    @pytest.mark.skip("版本已更新")
    @pytest.mark.run(order=0)
    def test_02(self):
        result=add(1,2)
        assert 3 == result
    @pytest.mark.run(order=-1)
    def test_03(self):
        result=add(1,3)
        assert 4 == result
    # @pytest.mark.last
    def test_04(self):
        result = add(1, 4)
        assert 5 == result